const http = require('http');
const fs = require('fs');

http.createServer((req, res) => {
    // const readStream = fs.createReadStream('data.txt');
    const readStream = fs.createReadStream('demo.png');
    readStream.pipe(res);
}).listen(8080, () => {
    console.log('server running on localhost:8080');
});
